<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <cpn ref="asd"></cpn>
  <button @click="clickMeFunction">Click Me</button>
</div>
<template id="cpn">
  <div>
    <h2>Hello Component</h2>
  </div>
</template>

<script src="./js/vue.js"></script>

<script>
  const app = new Vue({
    el:'#app',
    data:{
      message:'Hello World'
    },
    methods:{
      clickMeFunction(){
        this.$refs['asd'].showMessage();
      }
    },
    components:{
      cpn:{
        template:'#cpn',
        methods:{
          showMessage(){
            console.log("cpn:methods -> showMessage");
          }
        }
      }
    }
  });
</script>
</body>
</html>